home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / X11 / Fresco / build / Unix / config / cf / ibm.cf < prev    next >
Text File  |  1995-07-12  |  9KB  |  299 lines

  1. XCOMM platform:  $XConsortium: ibm.cf,v 1.52 94/06/04 16:44:25 rws Exp $
  2.  
  3. #ifdef RsArchitecture
  4. #define OSName        AIX 3.2.5
  5. #define OSMajorVersion    3
  6. #define OSMinorVersion    2
  7. #define OSTeenyVersion    5
  8. #else
  9. #ifdef RtArchitecture
  10. #ifdef AIXArchitecture
  11. #define OSName        AIX 2.2
  12. #define OSMajorVersion    2
  13. #define OSMinorVersion    2
  14. #else
  15. #define OSName        AOS 4.3
  16. #define OSMajorVersion    4
  17. #define OSMinorVersion    3
  18. #endif
  19. #else
  20. #define OSName        AIX 1.2.1
  21. #define OSMajorVersion    1
  22. #define OSMinorVersion    2
  23. #define OSTeenyVersion    1
  24. #endif
  25. #endif
  26. XCOMM operating system:  OSName
  27.  
  28. #ifdef RsArchitecture
  29.  
  30. #if OSMajorVersion > 3 || (OSMajorVersion == 3 && OSMinorVersion >= 2)
  31. #define HasBSD44Sockets        YES
  32. /*
  33.  * If you do not have threads support installed, put
  34.  * #define HasPosixThreads NO
  35.  * in the BeforeVendorCF section of your site.def.
  36.  */
  37. #if !defined(HasPosixThreads) && (OSMajorVersion > 3 || (OSMajorVersion == 3 && (OSMinorVersion > 2 || (OSMinorVersion == 2 && OSTeenyVersion > 4))))
  38. #define HasPosixThreads        YES
  39. #endif
  40. #if HasPosixThreads
  41. #define SystemMTDefines -D_THREAD_SAFE
  42. #define ThreadedX        YES
  43. #define ThreadsLibraries -lpthreads -lc_r
  44. #endif
  45. #endif
  46.  
  47. #define CcCmd xlc
  48.  
  49. /*
  50.  * For IBM platforms, we must define both the location of the compiler
  51.  * and the location of its standard C++ library.  The library location
  52.  * is needed to resolve dependent library symbols when we build our own
  53.  * C++ shared libraries like libFresco
  54.  */
  55.  
  56. #ifndef CplusplusCmd
  57. #define CplusplusCmd xlC
  58. #endif
  59. #ifndef CplusplusLibC
  60. #define CplusplusLibC /usr/lpp/xlC/lib/libC.a
  61. #endif
  62. #ifndef CplusplusDependIncludes
  63. #define CplusplusDependIncludes -I/usr/lpp/xlC/include
  64. #endif
  65.  
  66. /*
  67.  * IBM's xlC refuses to compile files unless their names end in ".C".
  68.  * As an alternative to this fix, one could edit /etc/xlC.cfg
  69.  * to change the suffix accepted by the compiler, but we prefer not 
  70.  * requiring users to reconfigure their C++ compilers to make them work.
  71.  * We also have to override the default SUFFIXES to defeat the use of
  72.  * the builtin .C -> .o file, which doesn't use the right flags.
  73.  */
  74.  
  75. .SUFFIXES:
  76. .SUFFIXES: .o .c .y .l .s .sh .h .f .Y .L .cxx
  77.  
  78. #define NormalLibObjCplusplusCompile(options) test -r $*.C || $(LN) $*.CCsuf $*.C @@\
  79.     $(CXX) -c $(CXXFLAGS) options $*.C
  80.  
  81. #define SpecialCplusplusObjectRule(baseobj,basedep,options)        @@\
  82. baseobj.Osuf:    basedep.CCsuf                        @@\
  83.     test -r basedep.C || $(LN) basedep.CCsuf basedep.C        @@\
  84.     $(CXX) -c $(CXXFLAGS) options basedep.C
  85.  
  86.  
  87. #define SystemV            YES
  88. #define LdCombineFlags        -r
  89. #define ExecableScripts        YES
  90. #define Malloc0ReturnsNull    YES
  91. #define CppCmd            /usr/lpp/X11/Xamples/util/cpp/cpp
  92. #define StandardDefines         -DSYSV -DAIXV3 -D_ALL_SOURCE
  93. #define ExpandManNames        YES
  94. #define ExtensionOSDefines -DXTESTEXT1
  95. #define XibmServer         YES
  96. #define ibmIncludeSKYWAY    YES
  97. #define OPERATING_SYSTEM     AIX /* directory name under server/ddx/ibm/ */
  98. #define InstallCmd              /usr/ucb/install
  99. #include <ibmLib.rules>
  100.  
  101. #else
  102.  
  103.  
  104. #define UnixCpp /**/
  105. #define cppdefs -DUNIXCPP
  106.  
  107. #ifdef ATHENA
  108. #define ibmAthenaDefs -DATHENA
  109. #else
  110. #define ibmAthenaDefs /**/
  111. #endif
  112.  
  113. #ifdef AIXArchitecture
  114. #define SystemV YES
  115. #ifdef RtArchitecture
  116. #define BootstrapCFlags -Daix
  117. #define OSDefines -DAIX -DAIXrt -DNO_FUNCTION_PROTOTYPES -DIBM_OS_HAS_HFT
  118. #else
  119. #define ExecableScripts        YES
  120. #define ExpandManNames        YES
  121. #define InstallCmd              /usr/ucb/install
  122. #define OSDefines -DAIX386 -DIBM_OS_HAS_HFT
  123. #define    NeedFunctionPrototypes    YES
  124. #define    NeedNestedPrototypes    YES
  125. #define    NeedConstPrototypes    YES
  126. #define    NeedVarargsPrototypes    YES
  127. #define LdCombineFlags -r /* PS/2 doesn't do ld -X */
  128. #endif
  129. #define OPERATING_SYSTEM AIX /* directory name under server/ddx/ibm/ */
  130.  
  131. #ifdef USE_PCC
  132. #define CcCmd i386cc
  133. #define ibmosdefs -DHCVERSION=HCRevision
  134. #else
  135. #ifdef RtArchitecture
  136. #define CcCmd cc -Nd4000 -Nn3000 -DBSD_INCLUDES
  137. #define ibmosdefs -DSYSV -Nd4000 -Nn3000
  138. #define ibmlibdefs -Hcpp
  139. #else
  140. #define ibmosdefs -DSYSV
  141. #endif
  142. #endif /* USE_PCC */
  143.  
  144. #else /* else AOS - warning: AOS is going away... */
  145. #define HasNdbm YES
  146. #define CcCmd hc
  147. #define ibmosdefs -DHCVERSION=HCRevision
  148. #define OSDefines -DBSDrt
  149. #define OPERATING_SYSTEM BSDrt
  150. #define BootstrapCFlags -Dibm
  151. #if OSMajorVersion >= 4 && OSMinorVersion >= 3
  152. #define SetTtyGroup YES
  153. #endif
  154. #endif /* AIXArchitecture */
  155.  
  156. #define HasVoidSignalReturn    NO
  157.  
  158. #ifdef RtArchitecture
  159. /*
  160.  * These define the screens the server will allow
  161.  * affected:    .../server/ddx/ibm/Makefile
  162.  *              .../server/ddx/ibm/common/Makefile
  163.  * Also, be sure to remove .../server/ddx/ibm/common/ibmscreen.o
  164.  */
  165. #define ibmInclude8514  NO /* YES */
  166. #define ibmIncludeAED   NO
  167. #define ibmIncludeAPA16 YES
  168. #define ibmIncludeAPA8c NO
  169. #define ibmIncludeEGA   NO /* YES */
  170. #define ibmIncludeMPEL  NO
  171. #define ibmIncludeVGA   NO /* YES */
  172. #define ibmIncludeGEN   NO
  173. #endif /* RtArchitecture */
  174.  
  175. #ifdef PS2Architecture
  176. /*
  177.  * These define the screens the server will allow
  178.  * affected:    .../server/ddx/ibm/Makefile
  179.  *              .../server/ddx/ibm/common/Makefile
  180.  * Also, be sure to remove .../server/ddx/ibm/common/ibmscreen.o
  181.  * 
  182.  *                                        PS2, Rt, ...
  183.  */
  184. #define ibmInclude8514  YES
  185. #define ibmIncludeAED   NO
  186. #define ibmIncludeAPA16 NO
  187. #define ibmIncludeAPA8c NO
  188. #define ibmIncludeEGA   NO
  189. #define ibmIncludeMPEL  NO
  190. #define ibmIncludeVGA   YES
  191. #define ibmIncludeGEN   NO
  192. #endif /* PS2Architecture */
  193.  
  194. /*
  195.  * These define the screens the server will allow
  196.  * affected:    .../server/ddx/ibm/Makefile
  197.  *              .../server/ddx/ibm/common/Makefile
  198.  * Also, be sure to remove .../server/ddx/ibm/common/ibmscreen.o
  199.  * 
  200.  *                                        PS2, Rt, ...
  201.  */
  202. #ifndef ibmosdefs
  203. #define ibmosdefs /**/
  204. #endif
  205. #ifndef ibmarchdefs
  206. #define ibmarchdefs /**/
  207. #endif
  208. #ifndef ibmlibdefs
  209. #define ibmlibdefs /**/
  210. #endif
  211.  
  212.  
  213. #define StandardDefines -Dibm ibmosdefs ibmarchdefs
  214. #define LintOpts -ax -Dibm ibmosdefs ibmarchdefs
  215.  
  216. /* 
  217.  * This defines the name of server you want.
  218.  * affected: .../X11/server/Makefile
  219.  */
  220. #define XibmServer YES
  221.  
  222. /*****************************************************************************
  223.  *                        Platform-specfic parameters                        *
  224.  *****************************************************************************/
  225.  
  226.     /*
  227.      * affected:    .../server/ddx/ibm/common/Makefile
  228.      *        .../server/os/4.2bsd/Makefile
  229.      * remove:    .../server/ddx/ibm/common/ibminit.o
  230.      *        .../server/ddx/ibm/common/ibmio.o
  231.      *        .../server/ddx/ibm/common/ibmutils.o
  232.      *        .../server/os/4.2bsd/utils.o
  233.      */
  234.  
  235. /* Need This Also For our IBM Imakefiles */
  236. #define    SpecialMalloc        NO
  237. #define    ibmSpecialMalloc    NO
  238.  
  239.             PCC = pcc
  240.  
  241. #ifndef AIXArchitecture                /* AOS-specific */
  242. /*
  243.  * It's real useful to know the version of hc we're using, but hc doesn't
  244.  * identify itself in the pre-processor, so we have to do it by hand.
  245.  *
  246.  * To determine which version of hc you have, compile (DON'T link) some simple 
  247.  * program ("hello world" leaps to mind) and look in the .o (with "nm") for a 
  248.  * symbol named ".oVhc[0-9].[0-9][a-z]" -- this symbol is included in all 
  249.  * .o's by hc, and identifies the compiler release.
  250.  * 
  251.  * To Calculate HCRevision, multiply the version number by 1000 and add the
  252.  * index of the release letter.
  253.  * For example, if nm reports:
  254.  *    00000000 A .oVhc2.1d
  255.  * The HCRevision is ((2.1 * 1000)+('d'-'a'+1)) == 21004
  256.  * Another popular version of hc is:
  257.  *    00000000 A .oVhc1.4r
  258.  * Whose HCRevision is ((1.4 * 1000)+('r'-'a'+1)) == 14018
  259.  *
  260.  * A good clue that HCRevision is defined incorrectly is the undefined symbol
  261.  * '_Alloca' at load time.
  262.  */
  263.  
  264. #define    HCRevision    21025
  265.  
  266. /*
  267.  * hc revision 1.4r won't compile parts of Xt and some clients.
  268.  */
  269. #if HCRevision == 14018
  270. #define BandAidCompiler "rtcchack.bac"
  271. #undef MacroFile
  272. #define MacroFile ibm.cf $(IRULESRC)/rtcchack.bac
  273. #endif
  274. #endif /* AOS */
  275.  
  276.  
  277. /* 
  278.  * define this as you like for server compilation 
  279.  * affected: all makefiles in .../X11/server
  280.  */
  281. #define ServerExtraDefines  cppdefs -DNOSTDHDRS OSDefines
  282.  
  283.  
  284. #define FontOSDefines StandardDefines
  285. /* define this as you like for server font support */
  286. #ifdef AIXArchitecture
  287. #define FontFilters BDFTOSNFFILT SHELLPATH
  288. #endif
  289.  
  290. /* define the following line for easily debuggable servers, the */
  291. /* second line for especially speedy servers.            */
  292. /* #define ServerCDebugFlags    -O -DDEBUG -DTRACE_X */
  293. #define    ServerCDebugFlags -O ibmAthenaDefs
  294.  
  295. /* define this as you like for normal library compilation */
  296. #define LibraryDefines cppdefs ibmlibdefs StandardDefines
  297.  
  298. #endif /* non RsArchitecture */
  299.